#include <stdio.h>

#include <devices/gpio.h>


int
	main(
		void)
{
	struct gpiodev *dev;
	int i;

	dev = gpiodev_construct(63);
	if (NULL == dev) {
		printf("gpio_construct error\n");
		return -1;
	}
	if (gpiodev_export(dev) < 0) {
		printf("gpiodev_export error\n");
		gpiodev_deconstruct(dev);
		return -1;
	}
	gpiodev_setdir(dev, 0);
	
	for (i = 0; i < 10; i++) {
		gpiodev_setval(dev, 0);
		usleep(50000);
		gpiodev_setval(dev, 1);
		usleep(50000);
	}
	gpiodev_setval(dev, 0);

	return 0;
}
